How to connect IoT Hub

Discover the potential of IoT Hub

To begin, please contact our customer service at: smart-iot.contact@deltadore.com to benefit from our starter kit and access our services.

We will provide you with a developer account to login to our developer portal.

The IoT Hub brick is composed of a site management service and a remote control service.

This service allows you to manage the different sites linked to the customer account.

A site is considered as a residence on which you will configure the associated objects and manage access to the different accounts of this site.

Each site, to which a user is associated, has a "Site Access" object.

This object carries the link between them and their site (per user). It defines which site is his main residence, his name and his role in it.

You need to list the sites you have access to in order to retrieve the MAC address of the gateway you want to control.

Request
GET /sitesmanagement/api/v1/siteaccesslist

Response
{
    "pagination": {
        "offset": 0,
        "limit": 30
    },
    "count": 1,
    "site_access_list": [
        {
            "id": "597e89a3-2fab-492b-8436-a521f21e6bdd",
            "label": "Chez Moi",
            "join_date": "2020-07-27T08:28:49.667Z",
            "roles": [
                "OWNER",
                "INSTALLER"
            ],
            "site": {
                "id": "714fb935-1807-4a39-886c-dc7a4670cda1",
                "creation_date": "2019-11-07T08:11:07.403Z",
                "gateway": {
                    "id": "331900d6-9f9f-4e1b-ba04-9939ef3b383a",
                    "mac": "001A25XXXXXX",
                    "creation_date": "2019-11-07T08:11:07.9Z",
                    "hashes": []
                }
            },
            "profiles": [
                {
                    "id": "26cd136e-dee6-4f29-ac61-4a764e364cf9",
                    "label": "",
                    "creation_date": "2020-07-27T08:28:49.667Z",
                    "managed_by_google_home": true,
                    "managed_by_amazon_alexa": true,
                    "managed_by_dd_digital_twin": false,
                    "managed_by_ifttt": false
                }
            ],
            "managed_by_google_home": true,
            "managed_by_amazon_alexa": true,
            "managed_by_ifttt": false,
            "primary_residence": true
        }
    ]
}

The information to be retrieved is the "mac" field of the gateway object, of the site object.

This MAC address corresponds to the id of a gateway that must be used in all requests to control a device of this installation.

When you receive your starter pack, it’s possible that it’s not linked with your account yet. In order to add the gateway you just received, you must claim an access to it.

To do so, you need to make a claim request to declare this gateway as your own.


Request
POST /pilotage/api/v1/siteclaims
Body
{
    "gateway": {
        "mac": "001A25XXXXXX"
    }
}

When it’s done, you have 2 minutes to push the button on the back of the gateway. The gateway must be connected to the Internet, this is confirmed by the green LED on top of the gateway.

Now retry the previous request and you should have your site access. If the gateway is not on the site, the remote control service won’t work.

This service allows you to configure/manage a Delta Dore gateway.

You have retrieved the gateway, you are now going to activate its remote control. This method allows you to authorise your application to control this gateway. You only have to do this once.


Request
POST /pilotage/api/v1/control/gateways
Body
{
    "id": "001A25XXXXXX"
}

Before being able to control devices, we need to explain the data model associated to our eco-system:

A gateway consists of a list of devices representing the physical object. Each device is divided into one or more endpoints; most of the time it is a single endpoint. An endpoint represents the controlled function. For example, an Energy Manager could control up to 3 heating zones.

Each endpoint can contain data and/or cdata (complex data). The data is supported by the product. Data can be written, read or both. The list of data for each product is available by contacting our sales department. For example, for an energy manager can adjust data parameters : mode, setpoint, ambient temperature, …

All this data is described via their metadata, there is one for each piece of data. It will describe the permission (Read, Write), type (String, numeric, Boolean, …), acceptable values (list of available values or min/max for numeric, …).

The values of readable data are sent separately from the metadata in the data fields.

The cdata are described with their cmetadatas, there is one for each cdata.

The values of the cdata are different from data because they are a JSON formatted answer to a specific request. The attributes of the request are described in the cmetadatas. An example of a cdata is asking the consumption history of a product.


You will be able to retrieve the list of all the devices of a gateway, this method allows to retrieve all the devices, their endpoints, their data and the description of all their data.

Request
GET /pilotage/api/v1/gateways/001A25XXXXXX/devices?id_type=ID

Response
[
    {
        "id": "48",
        "endpoints": [
        {
            "id": "48",
            "metadata": [
            {
                "name": "levelCmd",
                "permission": "w",
                "type": "string",
                "enum_values": [
                    "ON",
                    "OFF",
                    "STOP",
                    "FAVORIT1",
                    "FAVORIT2",
                    "TOGGLE"
                ]
            },
            {
                "name": "thermicDefect",
                "permission": "r",
                "type": "boolean",
                "enum_values": [],
                "unit": "boolean"
            },
            {
                "name": "level",
                "permission": "rw",
                "type": "numeric",
                "enum_values": [],
                "min": 0,
                "max": 100,
                "step": 100,
                "unit": "%"
            },
            {
                "name": "recFav",
                "permission": "w",
                "type": "string",
                "enum_values": [
                    "FAVORIT1",
                    "FAVORIT2"
                ]
            },
            {
                "name": "onFavPos",
                "permission": "r",
                "type": "boolean",
                "enum_values": [],
                "unit": "boolean"
            },
            {
                "name": "localisation",
                "permission": "w",
                "type": "string",
                "enum_values": [
                    "START"
                ]
            },
            {
                "name": "modeAsso",
                "permission": "w",
                "type": "string,
                "enum_values": [
                    "START"
                ]
            }],
            "data": [
            {
                "name": "thermicDefect",
                "value": "false",
                "last_update": "2020-10-19T09:37:04.545Z",
                "state": "up_to_date"
            },
            {
                "name": "level",
                "value": "100",
                "last_update": "2020-10-19T09:37:04.546Z",
                "state": "up_to_date"
            },
            {
                "name": "onFavPos",
                "value": "false",
                "last_update": "2020-10-19T09:37:04.546Z",
                "state": "up_to_date"
            }],
            "cmetadata": [],
            "access": {
                "addr": {
                    "slot": "1",
                    "net": "2"
                    }
                },
            "devices": [],
            "error": 0
        }],
        "suppress_requested": false
    }
]

The data model of the control API is that the use of an endpoint is carried by the data that composes it. To list the lights, you have to look for all the endpoints that have the data "level".

Once the endpoint has been identified, you can re-interrogate it individually (this service will return the data and their values, but not the metadata:

Request
GET /pilotage/api/v1/control/gateways/001A25XXXXXX/devices/48/endpoints/48?id_type=ID

Response
[
    {
        "name": "thermicDefect",
        "value": "false",
        "last_update": "2020-10-19T09:52:23.585Z",
        "state": "up_to_date"
    },
    {
        "name": "level",
        "value": "0",
        "last_update": "2020-10-19T09:52:46.890Z",
        "state": "up_to_date"
    },
    {
        "name": "onFavPos,
        "value": "false,
        "last_update": "2020-10-19T09:52:23.586Z",
        "state": "up_to_date"
    }
]

To be able to control the product, you must set the data corresponding to this endpoint. For example, to switch on a light, you have to set the data “level” to “on”:

Request
PUT /pilotage/api/v1/control/gateways/001A25XXXXXX/devices/48/endpoints/48/data?id_type=ID

Body
[
    {
        "name": "level",
        "value": 100
    }
]
Let's talk